<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
     <%@ page import="cs9322.assign3.model.*" %>
     <%@ page import="com.sun.jersey.api.client.ClientResponse" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
	<h3>Order has been generated successfully</h3>
	<% Order o = (Order)request.getAttribute("order"); 
		Payment p = (Payment)request.getAttribute("payment");
	ClientResponse cr = (ClientResponse)request.getAttribute("response");
	%>
	<table>
	<tr>
	<td>
	Order ID:
	</td>
	<td>
	<%=o.getId() %> 
	</td>
	</tr>
	<tr>
	<td>
	Order uri:
	</td>
	<td>
	<a href=<%=o.getUrl() %>><%=o.getUrl() %></a>
	</td>
	</tr>
	<tr>
	<td>
	Payment uri:
	</td>
	<td>
	<a href=<%=p.getUrl() %>><%=p.getUrl() %></a>
	</td>
	</tr>
	<tr>
	<td>
	Order price:
	</td>
	<td>
	<%=o.getPrice() %>
	</td>
	</tr>
	</table>
	<br>
	<br>
		<a href="index.jsp">Home Page</a>
	<br>
	<br>
	<table>
	<tr>
	<td>
	response status:
	</td>
	<td>
	<%=cr.getStatus() %>
	</td>
	</tr>
	<tr>
	<td>
	response headers:
	</td>
	<td>
	<%=cr.getHeaders() %>
	</td>
	</tr>
	<tr>
	<td>
	response data:
	</td>
	<td>
	<%=cr.getResponseDate() %>
	</td>
	</tr>
	</table>
</body>
</html>